<ui:composition template="index.xhtml"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

        <ui:define name="title">
           Nieuwe bestemming
        </ui:define>

        <ui:define name="content">
     
            <h1>Nieuwe bestemming</h1>
            <h:form>  
                <div style="padding: 5px;">
                    <table>
                    <tr>
                        <td>Nieuw land:</td>
                        <td><h:inputText value="#{controllerAdmin.land.landNaam}" >
                             <f:validateLength minimum="2" /> 
                             <f:validateRequired /> 
                            </h:inputText></td>
                    </tr>
                    <tr>
                        <td>Welk continent:</td>
                        <td>
                            
                            <h:selectOneMenu id="continent_id" value="#{controllerAdmin.continentId}">
                                <f:selectItem itemLabel="--Select continent--" itemValue="-1" />
                                <c:forEach items="#{controllerReisZoeken.allContinent}" var="row">
                                    <f:selectItem itemLabel="#{row.naam}" itemValue="#{row.id}" />
                                </c:forEach>
                            </h:selectOneMenu>
                            
                        </td>
                    </tr>
                    <tr>
                        <td></td>  
                        <td><h:commandButton value="Toevoegen" action="#{controllerAdmin.toevoegenLand()}"></h:commandButton></td>  
                    </tr>
                </table>
                </div>
            </h:form>
            
        </ui:define>  
</ui:composition>
